/*******************************************************************************
 * Copyhacked (H) 2012-2025.
 * This program and the accompanying materials
 * are made available under no term at all, use it like
 * you want, but share and discuss it
 * every time possible with every body.
 * 
 * Contributors:
 *      ron190 at ymail dot com - initial implementation
 ******************************************************************************/
package com.jsql.view.swing.interaction;

import com.jsql.view.interaction.InteractionCommand;
import com.jsql.view.swing.util.MediatorHelper;

import javax.swing.*;
import java.util.UUID;

/**
 * Create a new tab for the terminal.
 */
public class AddTabExploitUdfExtensionPostgres extends CreateTabHelper implements InteractionCommand {

    /**
     * @param interactionParams The local path and url for the shell
     */
    public AddTabExploitUdfExtensionPostgres(Object[] interactionParams) {
        // nothing
    }

    @Override
    public void execute() {
        SwingUtilities.invokeLater(() -> MediatorHelper.tabResults().addTabExploitUdf(
            (String command, UUID terminalID) -> MediatorHelper.model().getResourceAccess().getExploitPostgres().runRceExtensionCmd(command, terminalID)
        ));
    }
}
